#include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::vector;
using std::swap;

void Input(vector <int> *list) {
    int count;
    cin >> count;
    list->reserve(count);
    int element;
    for (int i(0); i < count; ++i) {
        cin >> element;
        list->push_back(element);
    }
}

template <typename iterator = vector <int>::iterator>
void Swap_max(iterator iterator_begin, iterator iterator_end) {
    if (iterator_begin != iterator_end) {
        auto max_current = iterator_begin;
        for (auto i = iterator_begin; i != iterator_end; ++i) {
            if (*max_current < *i) {
                max_current = i;
            }
        }
        iter_swap(max_current, iterator_end - 1);
    }
}

template <typename iterator = vector <int>::iterator>
void Sort_bubble(iterator iterator_begin, iterator iterator_end) {
    while (iterator_begin != iterator_end) {
        Swap_max(iterator_begin, iterator_end);
        --iterator_end;
    }
}

void Output(vector <int> *list) {
    for (auto i = list->begin(); i != list->end(); ++i) {
        cout << *i << " ";
    }
}

int main() {
    vector <int> list;
    Input(&list);
    Sort_bubble(list.begin(), list.end());
    Output(&list);
}